package com.ruoyi.third.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.third.mapper.ThirdConfigFieldMapper;
import com.ruoyi.third.domain.ThirdConfigField;
import com.ruoyi.third.service.IThirdConfigFieldService;

/**
 * 配置参数Service业务层处理
 * 
 * @author yepanpan
 * @date 2025-02-06
 */
@Service
public class ThirdConfigFieldServiceImpl implements IThirdConfigFieldService 
{
    private static final Logger log = LoggerFactory.getLogger(ThirdConfigFieldServiceImpl.class);

    @Autowired
    private ThirdConfigFieldMapper thirdConfigFieldMapper;

    /**
     * 查询配置参数
     * 
     * @param id 配置参数主键
     * @return 配置参数
     */
    @Override
    public ThirdConfigField selectThirdConfigFieldById(Long id)
    {
        return thirdConfigFieldMapper.selectThirdConfigFieldById(id);
    }

    /**
     * 查询配置参数列表
     * 
     * @param thirdConfigField 配置参数
     * @return 配置参数
     */
    @Override
    public List<ThirdConfigField> selectThirdConfigFieldList(ThirdConfigField thirdConfigField)
    {
        return thirdConfigFieldMapper.selectThirdConfigFieldList(thirdConfigField);
    }

    /**
     * 新增配置参数
     * 
     * @param thirdConfigField 配置参数
     * @return 结果
     */
    @Override
    public int insertThirdConfigField(ThirdConfigField thirdConfigField)
    {
        thirdConfigField.setCreateTime(DateUtils.getNowDate());
        return thirdConfigFieldMapper.insertThirdConfigField(thirdConfigField);
    }

    /**
     * 修改配置参数
     * 
     * @param thirdConfigField 配置参数
     * @return 结果
     */
    @Override
    public int updateThirdConfigField(ThirdConfigField thirdConfigField)
    {
        thirdConfigField.setUpdateTime(DateUtils.getNowDate());
        return thirdConfigFieldMapper.updateThirdConfigField(thirdConfigField);
    }

    /**
     * 批量删除配置参数
     * 
     * @param ids 需要删除的配置参数主键
     * @return 结果
     */
    @Override
    public int deleteThirdConfigFieldByIds(Long[] ids)
    {
        return thirdConfigFieldMapper.deleteThirdConfigFieldByIds(ids);
    }

    /**
     * 删除配置参数信息
     * 
     * @param id 配置参数主键
     * @return 结果
     */
    @Override
    public int deleteThirdConfigFieldById(Long id)
    {
        return thirdConfigFieldMapper.deleteThirdConfigFieldById(id);
    }


}
